package com.ruoyi.system.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 员工管理对象 gw_staff
 *
 * @author ruoyi
 * @date 2025-04-27
 */
public class GwStaff extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long id;

    /**
     * 公司ID
     */
    @Excel(name = "公司ID")
    private String companyId;

    /**
     * 照片
     */
    @Excel(name = "照片")
    //@NotBlank(message = "请上传1张照片")
    private String url;

    /**
     * 员工姓名
     */
    @Excel(name = "员工姓名")
    @NotBlank(message = "姓名必填，限输入20个字符")
    @Length(max = 20, message = "姓名必填，限输入20个字符")
    private String staffName;

    /**
     * 部门
     */
    @Excel(name = "部门")
    @NotBlank(message = "部门必填，限输入20个字符")
    @Length(max = 20, message = "部门必填，限输入20个字符")
    private String deptName;

    /**
     * 岗位
     */
    @Excel(name = "岗位")
    @NotBlank(message = "岗位限输入20个字符")
    @Length(max = 20)
    private String post;

    /**
     * 身份证号
     */
    @Excel(name = "身份证号")
    @NotBlank(message = "身份证号码必填，限输入20个字符")
    @Length(max = 20, message = "身份证号码必填，限输入20个字符")
    private String idCard;

    /**
     * 手机号码
     */
    @Excel(name = "手机号码")
    @NotBlank(message = "手机号码必填，限输入11位纯数字")
    @Length(max = 11, message = "手机号码必填，限输入11位纯数字")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码必填，限输入11位纯数字")
    private String tel;

    /**
     * 合同到期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "合同到期时间", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "劳动合同到期时间必填")
    private Date contractExpirationTime;

    /**
     * 入职日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入职日期", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "入职日期必填")
    private Date emplDate;

    /**
     * 历史工龄(年)
     */
    @Excel(name = "历史工龄(年)")
    @Length(max = 5, message = "历史工龄限输入5个字符")
    private String seniority;

    /**
     * 性别
     */
    @Excel(name = "性别")
    private String sex;

    /**
     * 出生日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date birthDate;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private String status;

    /**
     * 删除标识
     */
    private String delFlag;

    private Long remindDays;

    private boolean needRemind;

    private GwStaffBase gwStaffBase;

//    @Valid
//    private List<@Valid GwStaffEducation> gwStaffEducations;
//    @Valid
//    private List<@Valid GwStaffWork> gwStaffWorks;

    //2025-7-4 去除校验
    private List<GwStaffEducation> gwStaffEducations;
    private List<GwStaffWork> gwStaffWorks;

    private List<GwContract> gwContracts;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUrl() {
        return url;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    public String getStaffName() {
        return staffName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setPost(String post) {
        this.post = post;
    }

    public String getPost() {
        return post;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getTel() {
        return tel;
    }

    public void setContractExpirationTime(Date contractExpirationTime) {
        this.contractExpirationTime = contractExpirationTime;
    }

    public Date getContractExpirationTime() {
        return contractExpirationTime;
    }

    public void setEmplDate(Date emplDate) {
        this.emplDate = emplDate;
    }

    public Date getEmplDate() {
        return emplDate;
    }

    public void setSeniority(String seniority) {
        this.seniority = seniority;
    }

    public String getSeniority() {
        return seniority;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSex() {
        return sex;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public GwStaffBase getGwStaffBase() {
        return gwStaffBase;
    }

    public void setGwStaffBase(GwStaffBase gwStaffBase) {
        this.gwStaffBase = gwStaffBase;
    }

    public List<GwStaffEducation> getGwStaffEducations() {
        return gwStaffEducations;
    }

    public void setGwStaffEducations(List<GwStaffEducation> gwStaffEducations) {
        this.gwStaffEducations = gwStaffEducations;
    }

    public List<GwStaffWork> getGwStaffWorks() {
        return gwStaffWorks;
    }

    public void setGwStaffWorks(List<GwStaffWork> gwStaffWorks) {
        this.gwStaffWorks = gwStaffWorks;
    }

    public List<GwContract> getGwContracts() {
        return gwContracts;
    }

    public void setGwContracts(List<GwContract> gwContracts) {
        this.gwContracts = gwContracts;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Long getRemindDays() {
        return remindDays;
    }

    public void setRemindDays(Long remindDays) {
        this.remindDays = remindDays;
    }

    public boolean isNeedRemind() {
        return needRemind;
    }

    public void setNeedRemind(boolean needRemind) {
        this.needRemind = needRemind;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("remindDays", getRemindDays()).append("needRemind", isNeedRemind()).append("gwStaffBase", getGwStaffBase()).append("gwStaffEducations", getGwStaffEducations()).append("gwStaffWorks", getGwStaffWorks()).append("gwContracts", getGwContracts()).append("companyId", getCompanyId()).append("url", getUrl()).append("staffName", getStaffName()).append("deptName", getDeptName()).append("post", getPost()).append("idCard", getIdCard()).append("tel", getTel()).append("contractExpirationTime", getContractExpirationTime()).append("emplDate", getEmplDate()).append("seniority", getSeniority()).append("sex", getSex()).append("status", getStatus()).append("birthDate", getBirthDate()).append("delFlag", getDelFlag()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
    }
}
